package com.water.controller;

import com.water.entity.Notice;
import com.water.result.Result;
import com.water.service.NoticeService;
import com.water.vo.NoticeVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: city_water
 * @description:
 * @author: lydms
 * @create: 2024-05-19 20:13
 **/

@RestController
@RequestMapping("/user/notice")
@Api(tags = "通知管理")
public class NoticeController {

    @Autowired
    private NoticeService noticeService;
    /**
     * 获取通知信息
     * @return
     */
    @GetMapping("/getInfo")
    @ApiOperation("获取通知信息")
    public Result< List<NoticeVo>> getNotice(){
    List<NoticeVo> noticeVoList = noticeService.getInfo();
        return Result.success(noticeVoList);
    }

}
